<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理员登录_风尚淘客程序</title>
<link href="Css/Style.css" rel="stylesheet" type="text/css" />
</head>
<?php
include('../model/user.php');
include('../model/function.php');

if($_REQUEST['act']=='logout'){
	$_SESSION['admin']='';
	$_SESSION['super']='';
	reload_js("","login.php");
}

if(isset($_POST["Submits"])){

	$user=preg_replace("/\s/i","",$_POST['AdminName']);
	checkLogin($user,$_POST['AdminPass'],1);
	if($_SESSION['admin']){
		reload_js("","index.php");
	}else{
		reload_js("用户名或密码错误","login.php");
	}
}else{

	if($_SESSION['admin']){
		reload_js("","index.php");
	}
}

?>

<body>
<div id="LoginLogo"></div>
<div id="LoginTop">
	<div class="BarLeft"></div>
    <div id="LoginTopText">管理员登录</div>
    <div class="BarRight"></div>
    <div class="Cal"></div>
</div>
<form id="AdminLogin" name="AdminLogin" method="post" action="">
<div id="LoginBox">
    <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="25">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td height="35" align="right" class="FontWeight">用户名：</td>
          <td><input name="AdminName" type="text" class="Input" id="AdminName" /></td>
      </tr>
        <tr>
          <td height="35" align="right" class="FontWeight">密码：</td>
          <td><input name="AdminPass" type="password" class="Input" id="AdminPass" /></td>
        </tr>
        <tr>
          <td height="10" colspan="2" align="center"></td>
      </tr>
        <tr>
            <td height="40" colspan="2" align="center"><input name="Submits" type="submit" class="Button" id="Submits" value="登录" />              &nbsp;&nbsp;<input name="ReSet" type="reset" class="Button" id="ReSet" value="重置" /></td>
        </tr>
        <tr>
            <td height="25" colspan="2" align="right" class="Font999">程序购买（QQ）：249917210</td>
        </tr>
    </table>
</div>
</form>
</body>
</html>